﻿<?php
require_once(dirname(__FILE__)."/../../libs/login/login.php"); 
require_once(dirname(__FILE__)."/../../libs/string/libstr.php");
require_once(dirname(__FILE__)."/../../admin/libs/shuxing_class.php");
$lg=new login();
$lg->checklogin("admin_member");//检验是否登录
$mc=new libstr();
$sx=new shuxing();


$tb="nianji_class";
if($_GET["sx"]=='nianji'){
	$tb="nianji_class";
}
if($_GET["sx"]=='xueke'){
	$tb="xueke_class";
}

if ($mc->Ismp($_POST["Submit"])!="")
{
	if ($_POST["classname"]==""){$mc->msg("类别名称不能为空","go");}
	$classname=$_POST["classname"];
	$content=$_POST["content"];
	 $classorder=$_POST["classorder"];
$sx->addshuxing($tb,$classname,$content,$classorder);
$mc->msg("添加成功","shuxing_class.php?id=".$id."&sx=".$_GET["sx"]."");

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理系统</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
</head>
<body style="background:#fff"> 
<div class="content">
    <div class="right">
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td  align="right"><img src="../images/weizhleft.png" width="12" height="45" /></td>
            <td width="100%" style="background:url(../images/weizhimid.png) repeat-x"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="55%"><?php echo $path;?></td>
              </tr>
            </table></td>
            <td width="1%" align="right" ><img src="../images/weizhiright.png" width="12" height="45" /></td>
          </tr>
        </table>
        </td>
      </tr>
</table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="liebiao">
  
  
  <tr>
    <td width="11%" height="50" align="right">类别名称：</td>
    <td height="50"><input name="classname" type="text" id="classname"  ><Font>
   </Font></td>
    </tr>
  <tr>
    <td height="50" align="right" valign="middle">类别排列：</td>
    <td height="50" valign="middle"><input name="classorder" type="text" id="classorder"><Font>
   (必须为数字)</Font></td>
    </tr>
  <tr>
    <td height="50" align="right" valign="middle">备注说明：</td>
    <td height="50" valign="middle"><textarea name="content" id="content" cols="30"  rows="2"></textarea>
      <Font>
   </Font></td>
    </tr>
  <tr>
    <td height="50" align="right" valign="middle">&nbsp;</td>
    <td height="50" valign="middle"><bdo>
      <input type="submit" name="Submit" value="提交"> <input type="button" name="Submit2" value="返回" onClick="location.href='product_class.php'">
    </bdo></td>
    </tr>
    </table>
</form>
</div>
</div>
</body>
</html>
